
pkgname=cracklib
pkgver=2.9.4
pkgrel=2
pkgdesc="Password Checking Library"
arch=('x86_64')
license=('GPL')
url="http://sourceforge.net/projects/cracklib"
depends=('glibc' 'zlib')
options=('!libtool')
source=("http://downloads.sourceforge.net/sourceforge/cracklib/$pkgname-$pkgver.tar.gz")
md5sums=('b31f7e3618cda7a2ac38588067275013')

build() {
  cd $startdir/src/$pkgname-$pkgver
  
  ./configure --prefix=/usr --without-python
  make 
}

check() {
  cd $srcdir/$pkgname-$pkgver
  
  make check
}

package() {
  cd $startdir/src/$pkgname-$pkgver
  make DESTDIR=$pkgdir install
  
  install -Dm644 dicts/cracklib-small $pkgdir/usr/share/dict/cracklib-small
  sh ./util/cracklib-format dicts/cracklib-small \
    | sh ./util/cracklib-packer $pkgdir/usr/share/cracklib/pw_dict
}

